﻿$(document).ready(function () {
    $(".menuRightButton").click(function (e) {
        var target = $(this);
        var groupID = target.attr("data-group");
        var menu = $("ul[data-group=" + groupID + "]");
        menu.hide();
        var hide = target.attr("hide");
        if (hide == null || hide != "true") {
            menu.hide();
            target.attr("hide", true);
            target.addClass("menuRightButtonDown");
            target.removeClass("menuRightButtonUp");
        }
        else {
            menu.show();
            target.attr("hide", false);
            target.addClass("menuRightButtonUp");
            target.removeClass("menuRightButtonDown");
        }
    });
});